StartSimulationEngine  "SimState/BasicObstacles.xml"


AddDifferentialDriveEntity    base1
	/Position:-1  0  0

AddSonarEntity    sonar1
	/Position:0  0.4  -0.3
	/ParentEntity:base1


AddDifferentialDriveEntity    base2
	/Position:0  0  0

AddSonarEntity    sonar2
	/Position:0  0.4  -0.3
	/ParentEntity:base2

AddDifferentialDriveEntity    base3
	/Position:1  0  0

AddSonarEntity    sonar3
	/Position:0  0.4  -0.3
	/ParentEntity:base3


FlushScript  


call proc_main with concur

procedure proc_main

	call proc1
	
	call proc2
	
	call proc3
end 

procedure proc1
	while (true)
	{
		base1.GoTo(1.0,   0.3)        //base1.DriveDistance(1.0,   0.3) 
		base1.Turn(-90,   0.2)        //base1.RotateDegrees(1.0,   0.3) 
	}
end 

procedure proc2
	while (true)
	{
		base2.GoTo(1.5,   0.3)
		base2.Turn(-90,   0.2)
	}
end 

procedure proc3
	while (true)
	{
		base3.GoTo(2.0,   0.3)
		base3.Turn(-90,   0.2)
	}
end 




